package com.ideeli.hwz.domain;

import com.ideeli.webextractor.utils.Utility;

/**
 * 
 */

/**
 * @author sa hwz
 * 
 */
public class HWZProduct
{
	String productId;
	String title;
	String description;
	String tags;
	String image;
	String category;
	float price;
	
	public String getTitle()
	{
		return title;
	}
	public void setTitle(String title)
	{
		this.title = title;
	}
	public String getDescription()
	{
		return description;
	}
	public void setDescription(String description)
	{
		if(description!=null && description.contains("Detail specification:"))
			this.description = description.subSequence(0, description.indexOf("Detail specification:")).toString();
		else
			this.description = description;
	}
	public String getTags()
	{
		return tags;
	}
	public void setTags(String tags)
	{
		this.tags = tags;
	}
	public String getImage()
	{
		return image;
	}
	public void setImage(String image)
	{
		this.image = image;
	}
	public float getPrice()
	{
		return Utility.round2(price);
	}
	public void setPrice(float price)
	{
		this.price = price;
	}
	public String getProductId()
	{
		return productId;
	}
	public void setProductId(String productId)
	{
		this.productId = productId;
	}
	public void setCategory(String category)
	{
		this.category = category;
	}
	
	public String getCategory()
	{
		return this.category;
	}
	@Override
	public String toString()
	{
		return "HWZProduct [productId=" + productId + ", title=" + title + ", description=" + description + ", tags=" + tags + ", image=" + image
				+ ", category=" + category + ", price=" + price + "]";
	}

}
